<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="main">
        <div>div1</div>
        <div>
            <div>
                hello
            </div>
        </div>
        <div>div2</div>
    </div>
    <script>
        const main = document.getElementById('main')
        console.log(main.innerText)  // main子节点所有的文本

        main.innerText = 'hello vue3'  // 替换掉main所有的子节点为'hello vue3'
    </script>
</body>
</html>